package week08;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;

public class Main4 {

    public static void main(String[] args) throws IOException {
        byte[] content = null;
        FileInputStream fis=null;
        try {
            fis = new FileInputStream("testfis.txt");
            int bytesAvailabe = fis.available();
            if(bytesAvailabe>0){
                content = new byte[bytesAvailabe];
                fis.read(content);
            }
        } catch (FileNotFoundException e) {
            System.out.println(e);
        }
        finally
        {
            if(fis!=null)
                try{
                    fis.close();
                }catch(Exception e){
                    System.out.println(e);
                    }
        }
        System.out.println(Arrays.toString(content));
    }

}
